const cloud = require('wx-server-sdk')
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV })
const db = cloud.database()

exports.main = async (event, context) => {
  return await db.collection('orderList').add({ data: { 
    openid: event.openid,
    money: event.money,
    phone: event.phone,
    date: event.date,
    project: event.project,
    status: event.status
  }})
}
